home *** CD-ROM | disk | FTP | other *** search
- /*
- File: MSAMSlot.h
-
- Contains: xxx put contents here xxx
-
- Written by: Tim Harnett
-
- Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <16> 2/16/95 TMH got rid of ProcessIncomingMail
- <15> 2/15/95 TMH added SetSlotID()
- <14> 2/14/95 TMH replace GetEWorldSlot and GetHFSSlot with GetExternalSlot
- <13> 2/10/95 TMH change wireless to HFS
- <12> 12/20/94 TMH added IsLocationActive(), Busy()
- <11> 12/16/94 TMH added GetOutTrayLetterInfo(), IsLetterDone·
- <10> 12/12/94 TMH modified so slot Id is written only once
- <9> 10/28/94 TMH fixed null terminator bug in GetUserPassword
- <8> 10/18/94 TMH read the users name and password
- <7> 10/14/94 TMH added GetDirExtType()
- <6> 10/13/94 TMH added IsOurRecipient
- <5> 10/11/94 TMH CommThread integration
- <4> 10/6/94 TMH move LogError and GetLogEntry to LogErrors.cp
- <3> 10/3/94 TMH break of THFS&TEWorld from TExternalSlot
- <2> 9/22/94 TMH added use of CQueueEnumerator.cp,.h
- <1> 9/20/94 TMH Abandon RoadsideRest embrace Mercury
- <2> 9/9/94 TMH TIncoming/TOutgoing adaptations
- 4/12/94 TMH xxx put comment here xxx
-
- To Do:
- */
-
- #ifndef __MSAMSlot__
- #define __MSAMSlot__
-
- class TSlotThread;
- class TExternalSlot;
- class TEWorldSlot;
- class TIncomingXLetter;
- class TOutgoingALetter;
- class CUnpackedDSSpec;
-
- #ifndef __OCE__
- #include <OCE.h>
- #endif
-
- #ifndef __OCEMAIL__
- #include <OCEMail.h>
- #endif
-
- #ifndef __CRecordID__
- #include "CRecordID.h"
- #endif
-
- #ifndef __Debug__
- #include "Debug.h"
- #endif
-
-
- //--------------------------------------
- // T M S A M S l o t
- //--------------------------------------
-
-
-
- class TMSAMSlot {
- public:
-
- // Construction, Initialization, Destruction
-
- TMSAMSlot();
- ~TMSAMSlot();
- void IMSAMSlot(CreationID* slotCID);
-
- OSErr SetSlotInfo();
- void SetLocationFlags(MailLocationFlags locationFlags) { fStdSlotInfo.active = locationFlags; };
-
- OSErr OpenQueues();
- OSErr Activate();
-
- //----------------
- // Accessors
- //----------------
-
- MSAMQueueRef GetInQueueRef();
- MSAMQueueRef GetOutQueueRef();
- short GetSlotID();
- void SetSlotID(short slotID) { fSlotID = slotID; };
- CreationID GetSlotCID() { return fSlotRecord->fCID; };
- CRecordID* GetSlotRecord() { return fSlotRecord; };
- CRecordID* GetDirectoryRecord() { return fDirectoryRecord; };
-
-
- char* GetExSysUserName(char* userName);
- char* GetExSysPassword(char* password);
-
-
- TSlotThread* GetSlotThread() { return fSlotThread; };
-
- TExternalSlot* GetExternalSlot();
-
- CDirectoryName& GetDirectoryName() { ASSERT(fDirectoryRecord); return (CDirectoryName&) fDirectoryRecord->Name(); }
- OSType GetDirExtType() { return fDirDiscriminator.signature; }
-
-
-
- Boolean IsOurRecipient(CUnpackedDSSpec& recipient);
-
-
- Boolean IsLocationEnabled();
- Boolean IsEnabled() { return this->IsLocationEnabled() && (this->GetOutQueueRef() != 0) ; }
-
- Boolean Busy();
-
- // Letter Processing
-
- long CountOutgoingLetters();
- TOutgoingALetter* GetOutgoingLetter();
-
- OSErr GetOutTrayLetterInfo(long letterSeqNo,MSAMEnumerateOutQReply& outQReply);
- Boolean IsLetterDone(long letterSeqNo);
-
-
- private:
- OSErr ReadDirectoryInfo();
- OSErr ReadExSysUserNameAndPassword();
-
- private:
-
- short fSlotID;
- CRecordID* fSlotRecord;
- CRecordID* fDirectoryRecord;
- DirDiscriminator fDirDiscriminator;
-
- CRecordName fUserName;
- CRString32 fPassword;
-
- MailStandardSlotInfoAttribute fStdSlotInfo;
- MSAMQueueRef fInQueueRef;
- MSAMQueueRef fOutQueueRef;
-
- TSlotThread* fSlotThread;
-
- TExternalSlot* fExternalSlot;
- };
-
-
-
-
- #endif __MSAMSlot__